/*
 * search_event.h
 *
 *  Created on: 23.06.2013
 *      Author: SpirTanol
 */

#ifndef SEARCH_EVENT_H_
#define SEARCH_EVENT_H_

#include "global.h"

class DeviceInfo;

class SearchEvent
{
	SearchEventType oType;

public:
	SearchEvent(SearchEventType type) : oType(type) {}
	virtual ~SearchEvent() {}

	SearchEventType type() const { return oType; }

};

class SearchEventError : public SearchEvent
{
public:
	enum Code
	{
		OPEN_ERROR,
	};

private:
	Code oCode;

public:
	SearchEventError(Code code) : SearchEvent(SET_ERROR), oCode(code) {}
	~SearchEventError() {}

	inline Code code() const { return oCode; }
};

class SearchEventFound : public SearchEvent
{
	DeviceInfo *oInfo;

public:
	SearchEventFound(DeviceInfo *info) : SearchEvent(SET_FOUND), oInfo(info) {}
	~SearchEventFound();

	inline DeviceInfo *deviceInfo() const { return oInfo; }

};

#endif /* SEARCH_EVENT_H_ */
